<?php
/**
 * User: xuxiaoming
 * Date: 2017/11/7
 * Time: 17:55
 */

namespace App\Http\Controllers;


use App\Models\UserProject;
use Illuminate\Http\Request;
use Laravel\Lumen\Routing\Controller;

class MyController extends Controller
{



    /**
     * 列表
     * @param Request $request
     * @return string
     */
    public function getProject(Request $request)
    {
         $userId = validateToken();

        $userProject = UserProject::where(["user_id" => $userId])->get();
        if ($userProject) {
            return sendJsonData($userProject->toArray());
        } else{
            return sendJsonMessage('数据不存在',true);
        }
    }


}